// 主题变量

// 薄荷绿风格变量
$mint-theme: (
  bg-color: #F9FFFC,
  primary-color: #83D0C9,
  secondary-color: #DCEDFF,
  accent-color: #A8E6CF,
  text-primary-color: #333333,
  text-secondary-color: #666666,
  card-bg-color: #FFFFFF,
  card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1),
  icon-bg: linear-gradient(135deg, rgba(168, 230, 207, 0.2), rgba(220, 237, 255, 0.3)),
  button-bg: linear-gradient(135deg, #A8E6CF, #83D0C9),
  weather-bg: linear-gradient(to right, #A8E6CF, #DCEDFF),
  border-color: #DCEDFF,
);

// 奶油橙风格变量
$cream-theme: (
  bg-color: #FFF8E7,
  primary-color: #FF6F61,
  secondary-color: #FFD1A9,
  accent-color: #FFF5BA,
  text-primary-color: #4A3F35,
  text-secondary-color: #6B5B4C,
  card-bg-color: #FFFFFF,
  card-shadow: 0 3px 6px rgba(0, 0, 0, 0.08),
  icon-bg: linear-gradient(135deg, rgba(255, 245, 186, 0.5), rgba(255, 209, 169, 0.6)),
  button-bg: linear-gradient(to right, #FF6F61, #FF8A7B),
  weather-bg: linear-gradient(to right, #FFF5BA, #FFD1A9),
  border-color: #FFD1A9,
);

// 主题工具函数
@function theme-value($theme, $key) {
  @return map-get($theme, $key);
}

// 默认使用薄荷绿主题
$current-theme: $mint-theme !default;

// Mixin 设置全局主题变量
@mixin set-theme-variables($theme) {
  --bg-color: #{theme-value($theme, 'bg-color')};
  --primary-color: #{theme-value($theme, 'primary-color')};
  --secondary-color: #{theme-value($theme, 'secondary-color')};
  --accent-color: #{theme-value($theme, 'accent-color')};
  --text-primary-color: #{theme-value($theme, 'text-primary-color')};
  --text-secondary-color: #{theme-value($theme, 'text-secondary-color')};
  --card-bg-color: #{theme-value($theme, 'card-bg-color')};
  --card-shadow: #{theme-value($theme, 'card-shadow')};
  --icon-bg: #{theme-value($theme, 'icon-bg')};
  --button-bg: #{theme-value($theme, 'button-bg')};
  --weather-bg: #{theme-value($theme, 'weather-bg')};
  --border-color: #{theme-value($theme, 'border-color')};
}

// 主题类
.theme-mint {
  @include set-theme-variables($mint-theme);
}

.theme-cream {
  @include set-theme-variables($cream-theme);
}
